//
//  FadeActionLayer.h
//  StarBugs
//
//  Created by ?? ? on 2/10/12.
//  Copyright 2012 antisword@playorca.com. All rights reserved.
//


#ifndef __FADE_ACTION_H__
#define __FADE_ACTION_H__


#include "cocos2d.h"

class FadeActionLayer : public cocos2d::CCLayerColor
{
private:
    static FadeActionLayer *pFadeActionLayer;
    FadeActionLayer();
    ~FadeActionLayer();
    bool isEnd;
    bool isFadeOut;
//    cocos2d::CCLabelTTF *loadingLabel;
    cocos2d::CCSprite *loadingSprite;
public:
    static FadeActionLayer& getInstance()
    {
        if(pFadeActionLayer == NULL) pFadeActionLayer = new FadeActionLayer;
        return *pFadeActionLayer;
    }
    
    static FadeActionLayer* getInstancePtr()
    {
        if(pFadeActionLayer == NULL) pFadeActionLayer = new FadeActionLayer;
        return pFadeActionLayer;
    }
    
    
    void startFadeIn();
    void startFadeOut(bool loadingFlg);
    void startFadeOut(cocos2d::ccColor3B color);
    
    void _call_in();
    void _call_out();
    bool getActionEndFlg();
    bool getFadeOuntFlg();
    
};


#endif